home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11006 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.netxpress.com!root
  2. From: ghporter@NetXpress.com (Glenn H. Porter)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why does the "universal bugfunction" gets() survive in 1996?
  5. Date: Thu, 21 Mar 1996 14:18:37 GMT
  6. Organization: Digital Alpha Server NetXpress.com
  7. Message-ID: <4irokq$j1b@ferrari.NetXpress.com>
  8. References: <DoDGq8.Dqq@scn.org>
  9. NNTP-Posting-Host: ppp-1-18.netxpress.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. kurt@scn.org (Kurt Cockrum) wrote:
  13.  
  14. >especially since it's inherently dangerous and is potentially a grave disservice
  15. >to any user?  
  16.  
  17. >-- kurt@scn.org  kurt@grogatch.seaslug.org  (Kurt Cockrum)
  18. >Chair, Seattle-King County Save the Stupids Foundation
  19.  
  20. Kurt,
  21.  
  22. No function is inherently dangerous.  The danger lies in expecting the
  23. compiler/language to keep you from doing something dangerous.  My
  24. first C teacher told each of his classes "If you don't see the BIOS
  25. copyright message as your program output, you're not trying.  Just
  26. make sure you don't see it twice for the same bug."
  27.  
  28. If you use a function that dosn't check the length of the buffer, then
  29. you have to check the buffer.  It's that simple.  If you don't like
  30. it, don't use it.
  31.  
  32. Regards,
  33. Glenn
  34.  
  35.